<!-- DO NOT AUTO INDENT THIS FILE DUE TO PRELOADED YAML CONF -->
{% extends 'base/base.html' %}
{% load static %}

{% block title %}
Add Scan Engine
{% endblock title %}


{% block custom_js_css_link %}
<link rel="stylesheet" type="text/css" href="{% static 'plugins/switches/switches.min.css' %}">
{{ form.media }}
<style media="screen">
.ace_editor {
	width:100%;
	height:450px;
	border:1px solid #CCC;
}
.django-ace-toolbar{
	display: none;
}
</style>
{% endblock custom_js_css_link %}

{% block breadcrumb_title %}
<li class="breadcrumb-item"><a href="{% url 'scan_engine_index' %}">Engines</a></li>
<li class="breadcrumb-item active">Add Scan Engine</li>
{% endblock breadcrumb_title %}

{% block page_title %}
Add Scan Engine
{% endblock page_title %}

{% block main_content %}
<div class="row">
	<div class="col-xl-12">
		<div class="card">
			<div class="card-body">
				<h4 class="header-title">Scan Engines</h4>
				<p>
					<code>Scan Engines</code> are the most crucial part of reNgine. They define how a <code>scan</code> is performed against a target. <code>Scan Engines</code> allow you to define the configuration and use it against multiple targets.
					<br>
					YAML configuration allows you fine tuning the engines such as rate, templates to be used, or configurations to be used.
				</p>
				<form method="POST">
					{% csrf_token %}
					{% include "scanEngine/_items/form_engine.html" %}
					<button class="btn btn-primary submit-fn mt-2 float-end" type="submit">Add Scan Engine</button>
				</form>
			</div>
		</div>
	</div>
</div>
{% endblock main_content %}

{% block page_level_script %}
<script type="text/javascript">
$(document).ready(function() {
	$('.ace_text-input').attr('id','editor');
	document.getElementById("editor").innerHTML = `subdomain_discovery:
  uses_tools: [ amass-passive, assetfinder, sublist3r, subfinder ]
  threads: 10
  use_amass_config: false
  use_subfinder_config: false
  # amass_wordlist: default

screenshot:
  timeout: 10
  threads: 5

osint:
  discover: [ emails, metainfo, employees ]
  intensity: normal
  # intensity: deep
  dork: [ stackoverflow, 3rdparty, social_media, project_management, code_sharing, config_files, jenkins, wordpress_files, cloud_buckets, php_error, exposed_documents, struts_rce, db_files, traefik, git_exposed ]

port_scan:
  ports: [ top-1000 ]
  rate: 1000
  use_naabu_config: false
  # exclude_ports: [80, 8080]

dir_file_fuzz:
  wordlist: default
  extensions: [ php, git, yaml, conf, db, mysql, bak, asp, aspx, txt, conf, sql, json ]
  threads: 100
  recursive: false
  recursive_level: 1
  stop_on_error: false
  follow_redirect: false
  auto_calibration: false
  timeout: 10
  # delay: "0.1-0.2"
  # match_http_status: '200, 204'
  # max_time: 0

fetch_url:
  uses_tools: [ gauplus, hakrawler, waybackurls, gospider ]
  intensity: normal
  # intensity: deep
  ignore_file_extension: [jpg, png, jpeg, gif]
  gf_patterns: [ debug_logic, idor, img-traversal, interestingEXT, interestingparams, interestingsubs, jsvar, lfi, rce, redirect, sqli, ssrf, ssti, xss]

vulnerability_scan:
  concurrency: 10
  rate_limit: 150
  timeout: 5
  retries: 1
  templates: [ all ]
  # custom_templates: []
  severity: [ critical, high, medium, low, info, unknown ]
`;
});
</script>
{% endblock page_level_script %}
